<?php
namespace app\api\controller\supplier;
use app\api\base\RestfulBase;
use app\modules\supplier\logic\ShopGoodsLogic;
class GoodsSpec extends RestfulBase
{
    protected $logic;
    protected function _initialize()
    {

        $this->logic = new ShopGoodsLogic();

    }

    /**
     * 获取包装信息
     * @return Response
     */
    public function index(){
        if ($this->request->isPost()){
            $data = $this->logic->getSpec();
            if(is_array($data)){
                return $this->apiSuccess($data);
            }else{
                return $this->apiError($this->logic->getError());
            }
        }else{
            return $this->apiError('无效请求');
        }
    }
}